<?php

if (!empty($_POST['author'])){

require_once '../conf/DbConnectorW.php';
    
$db=mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME)
		or die('<p><font color=red>Fehler bei der Datenbankverbindung: '.
		mysqli_connect_errno().': '.mysqli_connect_error().'</p>');

$sql = "INSERT INTO Author (Auth_Name) VALUES ('$_POST[author]')";

mysqli_query($db, $sql);

mysqli_close($db);

?><div align="center"><p><font color=green><?php echo $_POST['author'] ?> was added to the DB.</p><p><input type="button" value="Close" onclick="window.parent.TINY.box.hide()" ></p></div><?php

} else {
    ?><div align="center"><p><font color=red>You forgot to add the Name.</p><p><input type="button" value="Close" onclick="window.parent.TINY.box.hide()" ></p></div><?php
}
?>
